package org.flashbrighton.as3bots.bots
{
	import org.flashbrighton.as3bots.events.BombSensorEvent;
	import org.flashbrighton.as3bots.events.BotEvent;
	import org.flashbrighton.as3bots.events.BulletHitBotEvent;
	import org.flashbrighton.as3bots.events.CollectGemEvent;
	import org.flashbrighton.as3bots.events.GemSensorEvent;
	import org.flashbrighton.as3bots.events.HitBombEvent;
	import org.flashbrighton.as3bots.events.HitBotEvent;
	import org.flashbrighton.as3bots.events.HitWallEvent;
	import org.flashbrighton.as3bots.events.ScanBotEvent;
	import org.flashbrighton.as3bots.models.BotData;

	public interface IBot
	{

		/** This method is called when your robot collides with another robot.
		 *
		 * @param event with information about the collision point
		 */
		function onHitBot(event:HitBotEvent):void;

		/** This method is called when your robot collides with a wall.
		 *
		 * @param event with information about the collision point
		 */
		function onHitWall(event:HitWallEvent):void;

		/** This method is called when your robot hit a bomb.
		 *
		 * @param event with information about the collision point
		 */
		function onHitBomb(event:HitBombEvent):void;
		
		/**
		 * This method is called when your robot sees another robot,
		 * i.e. when the robot's radar scan "hits" another robot.
		 *
		 * This method will only be called if the robot has the ExtraComponents.BOTSCANNER
		 *
		 * @param event containing the information about the nearest bot
		 */
		function onScanBot(event:ScanBotEvent):void;

		/** This method is called when your robot receive data from its gem sensor.
		 *
		 *
		 * @param event containing the information about the nearest gem but also the list of all gems
		 */
		function onGemSensor(event:GemSensorEvent):void;

		
		/** This method is called when your robot receive data from its bomb sensor.
		 *
		 *
		 * @param event containing the information about the nearest bomb
		 */
		function onBombSensor(event:BombSensorEvent):void;
		
		
		/** This method is called when a gem is collected
		 *
		 * @param event containing the information about the collected gem
		 *
		 */
		function onCollectGem(event:CollectGemEvent):void;

		/**
		 * The 'thinking' code for the bot.
		 * Code here is run every frame.
		 *
		 * @param data containing data about the current bot
		 */
		function update(data:BotData):void;

		/**
		 * The engine value on request by the bot
		 * (between -1 and 1).
		 * A positive value lets the game know the
		 * bot wants to move forward, backwards
		 * if a negative value.
		 */
		function getEnginePower():Number;

		/**
		 * The rotation value on request by the bot
		 * (between -1 and 1).
		 * A positive value lets the game know the
		 * bot wants to rotate clockwise, anti-clockwise
		 * if a negative value.
		 */
		function getSteeringPower():Number;

		/** Write a message to the messages board */
		function writeMessage(message:String):void;

	/** This method is called when one of your bullets hits another robot. */
		//function onBulletHitBot(event:BulletHitBotEvent):void;
	/** This method is called when one of your bullets hits another bullet. */
		//function onBulletHitBullet(event:BulletHitBulletEvent ):void;
	/** This method is called when one of your bullets misses, i.e. hits a wall. */
		//function onBulletMissed(event:BulletMissedEvent ):void;
	/** This method is called if your robot dies. */
		//function onDeath(event:DeathEvent):void;
	/** This method is called when your robot is hit by a bullet. */
		//function onHitByBullet(event:HitByBulletEvent):void;

	}
}
